open(BUFF,"/data2/bsi/RandD/bora/OV_EQTL/snpsloc.txt");
open(BUFF1,"/data2/bsi/RandD/bora/OV_EQTL/SNP.txt");
$line = <BUFF>;
system("mkdir /data2/bsi/RandD/bora/OV_EQTL/SNP_IND");
$iline = <BUFF1>;
while(<BUFF>)
{
	chomp($_);
	@a =split(/\t/,$_);
	if(!exists($hash{$a[1]}))
	{
		open(WRBUFF,">/data2/bsi/RandD/bora/OV_EQTL/SNP_IND/chr$a[1].txt");	
		$hash{$a[1]} =1;
		print WRBUFF $iline;
	}
	$line = <BUFF1>;
	chomp($line);
	print WRBUFF $line."\n";
}

